#ifndef CANVAS_H_
#define CANVAS_H_

#include <gtkmm.h>
#include <gtkmm/drawingarea.h>
#include <list>
#include <iostream>
#include <map>
#include <sigc++/signal.h>

#include "Vista.h"
#include "VistaFondo.h"
#include "../common/Punto.h"
#include <cairomm/surface.h>
#include <cairomm/context.h>
#include <cairomm/refptr.h>
#include "../common/Mutex.h"
#include "../common/Thread.h"

using namespace std;
class Canvas : public Gtk::DrawingArea , public Thread  {
private:
	list<Vista*> vistas;
protected:
	bool estado;
	Mutex mutex;
	virtual bool on_draw(const Cairo::RefPtr<Cairo::Context>& cr);
	virtual bool on_button_press_event(GdkEventButton *event);
public:
	Canvas();
	virtual ~Canvas();
	void agregarVista(Vista* v);
	void quitarVista(short id);
	void ejecutar();
	void Start();
	void Stop();
	sigc::signal<void, Punto* > eventoClick;
	
};

#endif /*CANVAS_H_*/
